package com.example.aplicacioncomedor;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

/**
 * Created by Administrador on 31/08/13.
 */
public class Administrador extends Activity implements View.OnClickListener {
    // Array of options --> ArrayAdapter --> ListView
    //List view: {views: da_items.xml}

    Button button1;
    Button button2;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.actividad_administrador);

        button1=(Button)findViewById(R.id.btnCrear);
        button1.setOnClickListener(this);

        button2=(Button)findViewById(R.id.btnAdministrar);
        button2.setOnClickListener(this);
    }
    @Override
    public void onClick(View arg0){
        switch(arg0.getId()){
            case R.id.btnCrear:
                //Mostrar pantalla-Actividad
                Intent int1= new Intent("edu.grupo4.appcomedor.Registro");
                startActivity(int1);
                break;
            case R.id.btnAdministrar:
                //Mostrar pantalla-Actividad
                Intent int2= new Intent("edu.grupo4.appcomedor.Listar");
                startActivity(int2);
                break;
        }
    }
}